<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Structural commands: structcmd.h File Reference</title>
<link rel="icon" href="doxygen.ico" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Structural commands
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',false,false,'search.php','Search',false);
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="structcmd_8h.html#define-members">Macros</a> &#124;
<a href="structcmd_8h.html#typedef-members">Typedefs</a> &#124;
<a href="structcmd_8h.html#func-members">Functions</a> &#124;
<a href="structcmd_8h.html#var-members">Variables</a>  </div>
  <div class="headertitle"><div class="title">structcmd.h File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>A Documented file.  
<a href="structcmd_8h.html#details">More...</a></p>

<p><a href="structcmd_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:afa99ec4acc4ecb2dc3c2d05da15d0e3f" id="r_afa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcmd_8h.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">MAX</a>(a,  b)&#160;&#160;&#160;(((a)&gt;(b))?(a):(b))</td></tr>
<tr class="memdesc:afa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">A macro that returns the maximum of <em>a</em> and <em>b</em>.  <br /></td></tr>
<tr class="separator:afa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ae1e6edbbc26d6fbc71a90190d0266018" id="r_ae1e6edbbc26d6fbc71a90190d0266018"><td class="memItemLeft" align="right" valign="top">typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcmd_8h.html#ae1e6edbbc26d6fbc71a90190d0266018">UINT32</a></td></tr>
<tr class="memdesc:ae1e6edbbc26d6fbc71a90190d0266018"><td class="mdescLeft">&#160;</td><td class="mdescRight">A type definition for a .  <br /></td></tr>
<tr class="separator:ae1e6edbbc26d6fbc71a90190d0266018"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a2c4414339f388561554c2deab11a1a07" id="r_a2c4414339f388561554c2deab11a1a07"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcmd_8h.html#a2c4414339f388561554c2deab11a1a07">open</a> (const char *, int)</td></tr>
<tr class="memdesc:a2c4414339f388561554c2deab11a1a07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a file descriptor.  <br /></td></tr>
<tr class="separator:a2c4414339f388561554c2deab11a1a07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae152484c890a24e4d9b4980e7b965be0" id="r_ae152484c890a24e4d9b4980e7b965be0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcmd_8h.html#ae152484c890a24e4d9b4980e7b965be0">close</a> (int)</td></tr>
<tr class="memdesc:ae152484c890a24e4d9b4980e7b965be0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the file descriptor <em>fd</em>.  <br /></td></tr>
<tr class="separator:ae152484c890a24e4d9b4980e7b965be0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2a3ea719b83f672637febdd87c36c36" id="r_af2a3ea719b83f672637febdd87c36c36"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcmd_8h.html#af2a3ea719b83f672637febdd87c36c36">write</a> (int, const char *, size_t)</td></tr>
<tr class="memdesc:af2a3ea719b83f672637febdd87c36c36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes <em>count</em> bytes from <em>buf</em> to the filedescriptor <em>fd</em>.  <br /></td></tr>
<tr class="separator:af2a3ea719b83f672637febdd87c36c36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c7b76d5266903891c803132d51ccb90" id="r_a9c7b76d5266903891c803132d51ccb90"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcmd_8h.html#a9c7b76d5266903891c803132d51ccb90">read</a> (int, char *, size_t)</td></tr>
<tr class="memdesc:a9c7b76d5266903891c803132d51ccb90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read bytes from a file descriptor.  <br /></td></tr>
<tr class="separator:a9c7b76d5266903891c803132d51ccb90"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ad65a8842cc674e3ddf69355898c0ecbf" id="r_ad65a8842cc674e3ddf69355898c0ecbf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcmd_8h.html#ad65a8842cc674e3ddf69355898c0ecbf">errno</a></td></tr>
<tr class="memdesc:ad65a8842cc674e3ddf69355898c0ecbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Contains the last error code.  <br /></td></tr>
<tr class="separator:ad65a8842cc674e3ddf69355898c0ecbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A Documented file. </p>
<p>Details. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="afa99ec4acc4ecb2dc3c2d05da15d0e3f" name="afa99ec4acc4ecb2dc3c2d05da15d0e3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="structcmd_8h.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">&#9670;&#160;</a></span>MAX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX</td>
          <td>(</td>
          <td class="paramtype"></td>          <td class="paramname"><span class="paramname"><em>a</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"></td>          <td class="paramname"><span class="paramname"><em>b</em></span>&#160;)&#160;&#160;&#160;(((a)&gt;(b))?(a):(b))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A macro that returns the maximum of <em>a</em> and <em>b</em>. </p>
<p>Details. </p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ae1e6edbbc26d6fbc71a90190d0266018" name="ae1e6edbbc26d6fbc71a90190d0266018"></a>
<h2 class="memtitle"><span class="permalink"><a href="structcmd_8h.html#ae1e6edbbc26d6fbc71a90190d0266018">&#9670;&#160;</a></span>UINT32</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef unsigned int <a class="el" href="structcmd_8h.html#ae1e6edbbc26d6fbc71a90190d0266018">UINT32</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A type definition for a . </p>
<p>Details. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ae152484c890a24e4d9b4980e7b965be0" name="ae152484c890a24e4d9b4980e7b965be0"></a>
<h2 class="memtitle"><span class="permalink"><a href="structcmd_8h.html#ae152484c890a24e4d9b4980e7b965be0">&#9670;&#160;</a></span>close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int close </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>fd</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Closes the file descriptor <em>fd</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>The descriptor to close. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2c4414339f388561554c2deab11a1a07" name="a2c4414339f388561554c2deab11a1a07"></a>
<h2 class="memtitle"><span class="permalink"><a href="structcmd_8h.html#a2c4414339f388561554c2deab11a1a07">&#9670;&#160;</a></span>open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int open </td>
          <td>(</td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>pathname</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>flags</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens a file descriptor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pathname</td><td>The name of the descriptor. </td></tr>
    <tr><td class="paramname">flags</td><td>Opening flags. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9c7b76d5266903891c803132d51ccb90" name="a9c7b76d5266903891c803132d51ccb90"></a>
<h2 class="memtitle"><span class="permalink"><a href="structcmd_8h.html#a9c7b76d5266903891c803132d51ccb90">&#9670;&#160;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int read </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>fd</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *</td>          <td class="paramname"><span class="paramname"><em>buf</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>count</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read bytes from a file descriptor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>The descriptor to read from. </td></tr>
    <tr><td class="paramname">buf</td><td>The buffer to read into. </td></tr>
    <tr><td class="paramname">count</td><td>The number of bytes to read. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af2a3ea719b83f672637febdd87c36c36" name="af2a3ea719b83f672637febdd87c36c36"></a>
<h2 class="memtitle"><span class="permalink"><a href="structcmd_8h.html#af2a3ea719b83f672637febdd87c36c36">&#9670;&#160;</a></span>write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t write </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>fd</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>buf</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>count</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes <em>count</em> bytes from <em>buf</em> to the filedescriptor <em>fd</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>The descriptor to write to. </td></tr>
    <tr><td class="paramname">buf</td><td>The data buffer to write. </td></tr>
    <tr><td class="paramname">count</td><td>The number of bytes to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ad65a8842cc674e3ddf69355898c0ecbf" name="ad65a8842cc674e3ddf69355898c0ecbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="structcmd_8h.html#ad65a8842cc674e3ddf69355898c0ecbf">&#9670;&#160;</a></span>errno</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int errno</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Contains the last error code. </p>
<dl class="section warning"><dt>Warning</dt><dd>Not thread safe! </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
